<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>编辑</title>
    <link th:href="@{/resources/iview/styles/iview.css}" rel="stylesheet">
    <link th:href="@{/resources/css/common.css}" rel="stylesheet">
</head>

<body>
    <div id="app" class="layout" ref="layout" v-cloak>
        <i-row>
            <i-col span="24">
                <div style="border: 0px solid red;overflow:auto;height: 100%;">
                    <i-form ref="formData" :model="formData" :rules="ruleValidate" :label-width="100"
                        style="padding: 10px 20px;">
                        <input type="text" v-model="formData.id" style="display: none;" />
                        <form-item label="sortNo" prop="sortNo">
                            <i-input type="text" v-model="formData.sortNo" placeholder="sortNo"></i-input>
                        </form-item>
                        <form-item label="jiraNumber" prop="jiraNumber">
                            <i-input type="text" v-model="formData.jiraNumber" placeholder="jiraNumber"></i-input>
                        </form-item>
                        <form-item label="jiraSummary" prop="jiraSummary">
                            <i-input type="text" v-model="formData.jiraSummary" placeholder="jiraSummary"></i-input>
                        </form-item>
                        <form-item label="preDB6" prop="preDB6">
                            <i-input type="textarea" :rows="4" v-model="formData.preDB6" placeholder="preDB6"></i-input>
                        </form-item>
                        <form-item label="preDB8" prop="preDB8">
                            <i-input type="textarea" :rows="4" v-model="formData.preDB8" placeholder="preDB8"></i-input>
                        </form-item>
                        <form-item label="preDB9" prop="preDB9">
                            <i-input type="textarea" :rows="4" v-model="formData.preDB9" placeholder="preDB9"></i-input>
                        </form-item>
                        <form-item label="preDB12" prop="preDB12">
                            <i-input type="textarea" :rows="4" v-model="formData.preDB12" placeholder="preDB12"></i-input>
                        </form-item>
                        <form-item label="preDB13" prop="preDB13">
                            <i-input type="textarea" :rows="4" v-model="formData.preDB13" placeholder="preDB13"></i-input>
                        </form-item>
                        <form-item label="preDB19" prop="preDB19">
                            <i-input type="textarea" :rows="4" v-model="formData.preDB19" placeholder="preDB19"></i-input>
                        </form-item>
                        <form-item label="db6" prop="db6">
                            <i-input type="textarea" :rows="4" v-model="formData.db6" placeholder="db6"></i-input>
                        </form-item>
                        <form-item label="db8" prop="db8">
                            <i-input type="textarea" :rows="4" v-model="formData.db8" placeholder="db8"></i-input>
                        </form-item>
                        <form-item label="db9" prop="db9">
                            <i-input type="textarea" :rows="4" v-model="formData.db9" placeholder="db9"></i-input>
                        </form-item>
                        <form-item label="db12" prop="db12">
                            <i-input type="textarea" :rows="4" v-model="formData.db12" placeholder="db12"></i-input>
                        </form-item>
                        <form-item label="db13" prop="db13">
                            <i-input type="textarea" :rows="4" v-model="formData.db13" placeholder="db13"></i-input>
                        </form-item>
                        <form-item label="db19" prop="db19">
                            <i-input type="textarea" :rows="4" v-model="formData.db19" placeholder="db19"></i-input>
                        </form-item>
                    </i-form>
                </div>
            </i-col>
        </i-row>
    </div>

    <script type="text/javascript" th:src="@{/resources/js/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/resources/js/common.js}"></script>
    <script type="text/javascript" th:src="@{/resources/iview/vue.min.js}"></script>
    <script type="text/javascript" th:src="@{/resources/iview/iview.min.js}"></script>
    <script type="text/javascript">
        let app = new Vue({
            el: '#app',
            data() {
                return {
                    //【请求地址】，按需修改
                    loadUrl: __Global.getServerUrl("/platform/script/load"),
                    saveUrl: __Global.getServerUrl("/platform/script/save"),

                    //【表单数据】，默认为空，按需修改
                    formData: {
                        id: "",
                        sortNo: null,
                        jiraNumber: null,
                        jiraSummary: null,
                        preDB6: "",
                        preDB8: "",
                        preDB9: "",
                        preDB12: "",
                        preDB13: "",
                        preDB19: "",
                        db6: "",
                        db8: "",
                        db9: "",
                        db12: "",
                        db13: "",
                        db19: ""
                    },

                    //【表单校验】，按需修改
                    ruleValidate: {
                        jiraNumber: [
                            { required: true, message: 'jiraNumber不能为空', trigger: 'blur' }
                        ],
                        jiraSummary: [
                            { required: true, message: 'jiraSummary不能为空', trigger: 'blur' }
                        ],
                    }
                }

            },
            mounted: function () {
                //根据主键ID加载表单数据
                this.formData.id = __Global.getParam("id");
                if (this.formData.id) {
                    this.load();
                }
            },
            methods: {
                load: function () {
                    CRUDHelper(this).setParams(this.formData).load();
                },

                //保存数据
                save(callback) {
                    CRUDHelper(this).setParams(this.formData).save(callback);
                },
            }
        });


    </script>
</body>

</html>